<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">

<title>Clean Blog - Start Bootstrap Theme</title>

<!-- Bootstrap Core CSS -->
<link href="/css/blog/bootstrap.min.css" rel="stylesheet">

<!-- Additional fonts for this theme -->
<link href="/css/font-awesome.min.css" rel="stylesheet" type="text/css">


<!-- Custom styles for this theme -->
<link href="/css/blog/clean-blog.min.css" rel="stylesheet">

<!-- Temporary navbar container fix until Bootstrap 4 is patched -->
<style>
.navbar-toggler {
	z-index: 1;
}

@media ( max-width : 576px) {
	nav>.container {
		width: 100%;
	}
}
</style>

</head>

<body>

	<!-- Navigation -->
	<nav class="navbar fixed-top navbar-toggleable-md navbar-light"
		id="mainNav">
		<div class="container">
			<button class="navbar-toggler navbar-toggler-right" type="button"
				data-toggle="collapse" data-target="#navbarResponsive"
				aria-controls="navbarResponsive" aria-expanded="false"
				aria-label="Toggle navigation">
				Menu <i class="fa fa-bars"></i>
			</button>
			<a class="navbar-brand page-scroll" href="index.html">Start
				BootDo</a>
			<div class="collapse navbar-collapse" id="navbarResponsive">
				<ul class="navbar-nav ml-auto">
					<li class="nav-item"><a class="nav-link page-scroll"
						href="/blog">首页</a></li>
					<li class="nav-item"><a class="nav-link page-scroll"
						href="about.html">关于布嘟</a></li>
					<li class="nav-item"><a class="nav-link page-scroll"
						href="/">开源项目</a></li>
					<li class="nav-item"><a class="nav-link page-scroll"
						href="contact.html">学习交流</a></li>
				</ul>
			</div>
		</div>
	</nav>

	<!-- Page Header -->
	<header class="intro-header"
		style="background-image: url('/img/blog/home-bg.jpg')">
		<div class="container">
			<div class="row">
				<div class="col-lg-8 offset-lg-2 col-md-10 offset-md-1">
					<div class="site-heading">
						<h1>BootDo Blog</h1>
						<span class="subheading">布嘟开源博客</span>
					</div>
				</div>
			</div>
		</div>
	</header>

	<!-- Main Content -->
	<div class="container">
		<div class="row">
			<div class="col-lg-8 offset-lg-2 col-md-10 offset-md-1">
				<div id="incomeNum" class="post-preview">
				</div>
				<!-- Pager -->
				<div class="clearfix">
					<a class="btn btn-secondary float-right" href="#">更早
						&rarr;</a>
				</div>
			</div>
		</div>
	</div>

	<hr>

	<!-- Footer -->
	<footer>
		<div class="container">
			<div class="row">
				<div class="col-lg-8 offset-lg-2 col-md-10 offset-md-1">
					<ul class="list-inline text-center">
						<li class="list-inline-item"><a href="#"> <span
								class="fa-stack fa-lg"> <i
									class="fa fa-circle fa-stack-2x"></i> <i
									class="fa fa-twitter fa-stack-1x fa-inverse"></i>
							</span>
						</a></li>
						<li class="list-inline-item"><a href="#"> <span
								class="fa-stack fa-lg"> <i
									class="fa fa-circle fa-stack-2x"></i> <i
									class="fa fa-facebook fa-stack-1x fa-inverse"></i>
							</span>
						</a></li>
						<li class="list-inline-item"><a href="#"> <span
								class="fa-stack fa-lg"> <i
									class="fa fa-circle fa-stack-2x"></i> <i
									class="fa fa-github fa-stack-1x fa-inverse"></i>
							</span>
						</a></li>
					</ul>
					<p class="copyright text-muted">
						
					</p>
				</div>
			</div>
		</div>
	</footer>

	<!-- jQuery Version 3.1.1 -->
	<script src="/js/jquery.min.js"></script>

	<!-- Tether -->
	<script src="/js/appjs/blog/tether.min.js"></script>

	<!-- Bootstrap Core JavaScript -->
	<script src="/js/bootstrap.min.js"></script>

	<!-- Theme JavaScript -->
	<script src="/js/appjs/blog/clean-blog.min.js"></script>

	<script>
		$(function(){
			var offseet = 0;
			bindList(offseet);
		});
		function bindList(offset) {
			$.ajax({
					url : 'blog/bContent/list?limit=10&offset='+offset,
					method:'get',
					dataType:'json',
					success : function(data) {
						var rows = data.rows;
						//alert(rows.length);
						var htmlText = "";
						for (i = 0; i< rows.length; i++) {
							htmlText += '<div class="post-preview">';
							htmlText += '<a href="/blog/bContent/post/'+rows[i].cid+'">';
							htmlText += '<h2 class="post-title">';
							htmlText += rows[i].title;
							htmlText += '</h2>';
							htmlText += '</a>';
							htmlText += '<p class="post-meta">作者：<a href="#">'+rows[i].author+'</a> &nbsp;&nbsp; '+rows[i].createdtime+'</p>';
							htmlText += '</div>';
							htmlText += '<hr>';
						}
						$("#incomeNum").append(htmlText);
					}
					});
		}
	</script>

</body>

</html>
